package com.fly.config;

import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.authorization.AuthorizationDecision;
import org.springframework.security.authorization.ReactiveAuthorizationManager;
import reactor.core.publisher.Mono;

/**
 * @author Fly
 * @Description
 * @Date Created in 13:49 2018/1/27
 * @Modified by
 */
public class MyReactiveAuthorizationManager implements ReactiveAuthorizationManager {

    @Override
    public Mono<AuthorizationDecision> check(Mono mono, Object o) {
        return null;
    }

    @Override
    public Mono<Void> verify(Mono authentication, Object object) {
        Mono.error(new AccessDeniedException("Access Denied"));
        return Mono.empty();
    }
}
